vcMultiScopeContainer

A container for one or more scopes.

See in: Overview

Module: vcExecutor2

Parent: -

Children -

Referenced by: vcIfStatement.ScopeContainer, vcSwitchCaseStatement.ScopeContainer

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
ScopeCountIntegerRGets the number of contained scopes.
ScopesvcList[vcScope]RGets a list of contained scopes.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
copyScopevcScopevcScope scope,
Optional Keyword[targetContainer = vcMultiScopeContainer],
Optional Keyword[desiredIndex = Integer]
Clones and adds the new scope to the target container.
See more
Parameters:
scope (vcExecutor2.vcScope): Subject scope to copy.
Optional: targetContainer (vcExecutor2.vcStatement): Destination container for the copy. Must be a multi-scope statement. Defaults to the given scope's container.
Optional: desiredIndex (int): Desired index to insert the copied scope. Not quaranteed to succeed. Use negative value to append to the end. Defaults to -1.

Returns:
vcExecutor2.vcScope: The cloned scope.

Exceptions:
TypeError: When copying fails.
ValueError: When targetContainer type is invalid.
createScopevcScopeNoneCreates and adds a new scope to the container.

Parameters:
None

Returns:
vcExecutor2.vcScope: The new scope.
moveScopeBooleanvcScope scope,
Optional Keyword[targetContainer = vcMultiScopeContainer],
Optional Keyword[desiredIndex = Integer]
Moves the given scope to the target container.
See more
Parameters:
scope (vcExecutor2.vcScope): Subject scope to move.
Optional: targetContainer (vcExecutor2.vcStatement): Destination container. Must be a multi-scope statement. Defaults to the given scope's container.
Optional: desiredIndex (int): Desired index to move the scope to. Not quaranteed to succeed. Use negative value to move to the end. Defaults to -1.

Returns:
bool: True on success, False otherwise.

Exceptions:
TypeError: When moving fails.
ValueError: When targetContainer type is invalid.

Events

Learn how to use events here. The events are also inherited from the parent class.

NameParametersDescription
OnScopeAddedvcScope scope,
int index
Invoked when a new scope is added to the object.
See more
Parameters:
scope (vcExecutor2.vcScope): The newly added scope.
index (int): The scope index.
OnScopeRemovingvcScope scope,
int index
Invoked when a scope is about to be removed from the object.
See more
Parameters:
scope (vcScope): The scope about to be removed.
index (int): The scope index.